<?php
/**
 * 周舟 hzboye010@163.com
 * addby sublime snippets
 * api : 用户关注
 */

namespace app\system\api;

use app\common\api\BaseApi;
use app\system\model\MemberFocus;

class MemberFocusApi extends BaseApi{
	const ADD      = 'system/MemberFocusApi/add';
	const COUNT    = 'system/MemberFocusApi/count';
	const GET_INFO = 'system/MemberFocusApi/getInfo';
	const DELETE   = 'system/MemberFocusApi/delete';
	const QUERY    = 'system/MemberFocusApi/query';
	const IS_FOCUS = 'system/MemberFocusApi/isFocus';
	const QUERY_WITH_COUNT    = 'system/MemberFocusApi/queryWithCount';
	
	public function isFocus($uid,$focus_uid){
		$r = $this->getInfo(['uid'=>$uid,'focus_uid'=>$focus_uid]);
		return (!$r['status'] || empty($r['info']))?'0':'1';
	}
	protected function _init(){
		$this->model = new MemberFocus();
	}

}
